CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT( PAM_FACE_AUTHENTICATION_TESTS )
SET( FINDF_SRCS
     ${CMAKE_SOURCE_DIR}/src/findf.cpp
     ${CMAKE_SOURCE_DIR}/../src/faceDetector.cpp
     ${CMAKE_SOURCE_DIR}/../src/tracker.cpp
   )
SET( CLIPF_SRCS
     ${CMAKE_SOURCE_DIR}/src/clipf.cpp
     ${CMAKE_SOURCE_DIR}/../src/faceDetector.cpp
     ${CMAKE_SOURCE_DIR}/../src/tracker.cpp
   )
SET( EYEDF_SRCS
     ${CMAKE_SOURCE_DIR}/src/eyedf.cpp
     ${CMAKE_SOURCE_DIR}/../src/eyesDetector.cpp
     ${CMAKE_SOURCE_DIR}/../src/utils.cpp
   )
SET( FINDF2_SRCS
     ${CMAKE_SOURCE_DIR}/src/findf2.cpp
   )

SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
FIND_PACKAGE(OpenCV REQUIRED)

SET( VERSION "0.4" )
SET( PKGDATADIR "${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}" )
SET( BINDIR "${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}" )

ADD_DEFINITIONS (-DVERSION='"${VERSION}"' -DPKGDATADIR=\"${PKGDATADIR}\" -DBINDIR=\"${BINDIR}\")

INCLUDE_DIRECTORIES( "${CMAKE_SOURCE_DIR}/include;../../include" )
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIR})

ADD_EXECUTABLE( findf ${FINDF_SRCS})
ADD_EXECUTABLE( clipf ${CLIPF_SRCS})
ADD_EXECUTABLE( eyedf ${EYEDF_SRCS})
ADD_EXECUTABLE( findf2 ${FINDF2_SRCS})
TARGET_LINK_LIBRARIES( findf ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES( clipf ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES( eyedf ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES( findf2 ${OpenCV_LIBS})

